home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE14 / FORMCOMP / CLN_FORM.PAS next >
Encoding:
Pascal/Delphi Source File  |  1996-09-07  |  1.2 KB  |  55 lines

  1. unit Cln_Form;
  2.  
  3. interface
  4.  
  5. uses
  6.   Forms, NewForms;
  7.  
  8. type
  9.   TClnForm = class(TNewForm)
  10.   procedure CreateParams (var Params : TCreateParams); override;
  11.   private
  12.     { Private declarations }
  13.   public
  14.     { Public declarations }
  15.   end;
  16.  
  17. var
  18.   ClnForm: TClnForm;
  19.  
  20. procedure Launch_Cln_Form;
  21.  
  22. implementation
  23.  
  24. {$R *.DFM}
  25.  
  26. procedure Launch_Cln_Form;
  27. begin
  28.   Launch (TClnForm,ClnForm);
  29. end;
  30.  
  31. procedure TClnForm.CreateParams (var Params : TCreateParams);
  32. begin
  33.   if Cfg.MDI_App                   { I have it as a user customised option }
  34.   then FormStyle := fsMdiChild;    { if Mdichild, then the form will close }
  35.                                    { correctly                             }
  36.  
  37.   Set_Enter := True;               { Enable Cr to Tab conversion }
  38.  
  39.   Set_Max    := True;              { Set maximum size }
  40.   Max_Width  := 600;
  41.   Max_Height := 400;
  42.  
  43.   Set_Min    := True;              { Set minimum size }
  44.   Min_Width  := 300;
  45.   Min_Height := 200;
  46.  
  47.   Set_Pos    := True;              { Set Maximise position }
  48.   Max_Left   := 50;
  49.   Max_Top    := 50;
  50.  
  51.   inherited CreateParams (Params);  { Now call the inherited CreateParams }
  52. end;
  53.  
  54. end.
  55.